package com.wing.system.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wing.system.dao.ApkVersionManagerDao;
import com.wing.system.model.entity.ApkVersionManager;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 *	版本挂历service
 * @author 25923
 */
@Service
public class ApkVersionManagerServiceImpl extends ServiceImpl<ApkVersionManagerDao, ApkVersionManager> implements ApkVersionManagerService {

    /**
     * 查询apk版本列表
     * @param pg
     * @param paramMap
     * @return
     */
    @Override
    public IPage<ApkVersionManager> pageList4app(Page<ApkVersionManager> pg, Map paramMap) {
        List<ApkVersionManager> list = baseMapper.pageList4app(pg, paramMap);
        pg.setRecords(list);
        return pg;
    }

    /**
     * 查询apk最新版本
     * @param type
     * @return
     */
    @Override
    public ApkVersionManager getLastBy(String type) {
        return  baseMapper.getLastBy(type);
    }
}